package com.mirabelle.juice.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the use_aroma database table.
 * 
 */
@Entity
@Table(name="use_aroma")
public class UseAroma implements Serializable {
	private static final long serialVersionUID = 1L;
	private UseAromaPK id;
	private Long quantity;
	private String unit;
	private Aroma aroma;
	private Recipe recipe;

	public UseAroma() {
	}


	@EmbeddedId
	public UseAromaPK getId() {
		return this.id;
	}

	public void setId(UseAromaPK id) {
		this.id = id;
	}


	@Column(nullable=false)
	public Long getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Long quantity) {
		this.quantity = quantity;
	}


	@Column(nullable=false, length=255)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}


	//bi-directional many-to-one association to Aroma
	@ManyToOne
	@JoinColumn(name="aroma_id", nullable=false, insertable=false, updatable=false)
	public Aroma getAroma() {
		return this.aroma;
	}

	public void setAroma(Aroma aroma) {
		this.aroma = aroma;
	}


	//bi-directional many-to-one association to Recipe
	@ManyToOne
	@JoinColumn(name="recipe_id", nullable=false, insertable=false, updatable=false)
	public Recipe getRecipe() {
		return this.recipe;
	}

	public void setRecipe(Recipe recipe) {
		this.recipe = recipe;
	}

}